package com.dt.platform.domain.hr;

import com.github.foxnic.dao.entity.Entity;
import io.swagger.annotations.ApiModel;
import javax.persistence.Table;
import com.github.foxnic.sql.meta.DBTable;
import com.dt.platform.constants.db.HrTables.HR_LEARN_PAPER;
import javax.persistence.Id;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.persistence.Transient;
import com.github.foxnic.api.swagger.EnumFor;
import java.util.List;
import org.github.foxnic.web.domain.system.DictItem;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.foxnic.commons.lang.DataParser;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import com.github.foxnic.dao.entity.EntityContext;
import com.dt.platform.domain.hr.meta.LearnPaperMeta;
import com.github.foxnic.sql.data.ExprRcd;



/**
 * 课程题库
 * <p>课程题库 , 数据表 hr_learn_paper 的PO类型</p>
 * @author 金杰 , maillank@qq.com
 * @since 2024-09-28 17:33:57
 * @sign ACF84B674DB3EEBFD6A75754B97D38C9
 * 此文件由工具自动生成，请勿修改。若表结构或配置发生变动，请使用工具重新生成。
*/

@Table(name = "hr_learn_paper")
@ApiModel(description = "课程题库 ; 课程题库 , 数据表 hr_learn_paper 的PO类型")
public class LearnPaper extends Entity {

	private static final long serialVersionUID = 1L;

	public static final DBTable TABLE =HR_LEARN_PAPER.$TABLE;
	
	/**
	 * 主键：主键
	*/
	@Id
	@ApiModelProperty(required = true,value="主键" , notes = "主键" , example = "591815108767815")
	private String id;
	
	/**
	 * 题库名称：题库名称
	*/
	@ApiModelProperty(required = false,value="题库名称" , notes = "题库名称" , example = "测试题库2")
	private String name;
	
	/**
	 * 题库类型：题库类型
	*/
	@ApiModelProperty(required = false,value="题库类型" , notes = "题库类型")
	private String type;
	
	/**
	 * 题目总数：题目总数
	*/
	@ApiModelProperty(required = false,value="题目总数" , notes = "题目总数" , example = "7")
	private Integer totalCnt;
	
	/**
	 * 判断题数：判断题数
	*/
	@ApiModelProperty(required = false,value="判断题数" , notes = "判断题数" , example = "1")
	private Integer judgeCnt;
	
	/**
	 * 单选题数：单选题数
	*/
	@ApiModelProperty(required = false,value="单选题数" , notes = "单选题数" , example = "5")
	private Integer radioCnt;
	
	/**
	 * 多选题数：多选题数
	*/
	@ApiModelProperty(required = false,value="多选题数" , notes = "多选题数" , example = "1")
	private Integer choiceCnt;
	
	/**
	 * 填空题数：填空题数
	*/
	@ApiModelProperty(required = false,value="填空题数" , notes = "填空题数" , example = "0")
	private Integer textareaCnt;
	
	/**
	 * 备注：备注
	*/
	@ApiModelProperty(required = false,value="备注" , notes = "备注" , example = "备注")
	private String notes;
	
	/**
	 * 创建人ID：创建人ID
	*/
	@ApiModelProperty(required = false,value="创建人ID" , notes = "创建人ID" , example = "110588348101165911")
	private String createBy;
	
	/**
	 * 创建时间：创建时间
	*/
	@ApiModelProperty(required = false,value="创建时间" , notes = "创建时间" , example = "2024-09-18 09:21:53")
	private Date createTime;
	
	/**
	 * 修改人ID：修改人ID
	*/
	@ApiModelProperty(required = false,value="修改人ID" , notes = "修改人ID" , example = "110588348101165911")
	private String updateBy;
	
	/**
	 * 修改时间：修改时间
	*/
	@ApiModelProperty(required = false,value="修改时间" , notes = "修改时间" , example = "2024-09-27 02:09:30")
	private Date updateTime;
	
	/**
	 * 是否已删除：是否已删除
	*/
	@ApiModelProperty(required = true,value="是否已删除" , notes = "是否已删除" , example = "0")
	private Integer deleted;
	@Transient
	@EnumFor("deleted")
	private Boolean deletedBool;
	
	/**
	 * 删除人ID：删除人ID
	*/
	@ApiModelProperty(required = false,value="删除人ID" , notes = "删除人ID")
	private String deleteBy;
	
	/**
	 * 删除时间：删除时间
	*/
	@ApiModelProperty(required = false,value="删除时间" , notes = "删除时间")
	private Date deleteTime;
	
	/**
	 * version：version
	*/
	@ApiModelProperty(required = true,value="version" , notes = "version" , example = "6")
	private Integer version;
	
	/**
	 * 租户：租户
	*/
	@ApiModelProperty(required = false,value="租户" , notes = "租户" , example = "T001")
	private String tenantId;
	
	/**
	 * paperQuestionList：paperQuestionList
	*/
	@ApiModelProperty(required = false,value="paperQuestionList" , notes = "paperQuestionList")
	private List<PaperQuestion> paperQuestionList;
	
	/**
	 * typeDict：typeDict
	*/
	@ApiModelProperty(required = false,value="typeDict" , notes = "typeDict")
	private DictItem typeDict;
	
	/**
	 * selectedCode：selectedCode
	*/
	@ApiModelProperty(required = false,value="selectedCode" , notes = "selectedCode")
	private String selectedCode;
	
	/**
	 * 获得 主键<br>
	 * 主键
	 * @return 主键
	*/
	public String getId() {
		return id;
	}
	
	/**
	 * 设置 主键
	 * @param id 主键
	 * @return 当前对象
	*/
	public LearnPaper setId(String id) {
		this.id=id;
		return this;
	}
	
	/**
	 * 获得 题库名称<br>
	 * 题库名称
	 * @return 题库名称
	*/
	public String getName() {
		return name;
	}
	
	/**
	 * 设置 题库名称
	 * @param name 题库名称
	 * @return 当前对象
	*/
	public LearnPaper setName(String name) {
		this.name=name;
		return this;
	}
	
	/**
	 * 获得 题库类型<br>
	 * 题库类型
	 * @return 题库类型
	*/
	public String getType() {
		return type;
	}
	
	/**
	 * 设置 题库类型
	 * @param type 题库类型
	 * @return 当前对象
	*/
	public LearnPaper setType(String type) {
		this.type=type;
		return this;
	}
	
	/**
	 * 获得 题目总数<br>
	 * 题目总数
	 * @return 题目总数
	*/
	public Integer getTotalCnt() {
		return totalCnt;
	}
	
	/**
	 * 设置 题目总数
	 * @param totalCnt 题目总数
	 * @return 当前对象
	*/
	public LearnPaper setTotalCnt(Integer totalCnt) {
		this.totalCnt=totalCnt;
		return this;
	}
	
	/**
	 * 获得 判断题数<br>
	 * 判断题数
	 * @return 判断题数
	*/
	public Integer getJudgeCnt() {
		return judgeCnt;
	}
	
	/**
	 * 设置 判断题数
	 * @param judgeCnt 判断题数
	 * @return 当前对象
	*/
	public LearnPaper setJudgeCnt(Integer judgeCnt) {
		this.judgeCnt=judgeCnt;
		return this;
	}
	
	/**
	 * 获得 单选题数<br>
	 * 单选题数
	 * @return 单选题数
	*/
	public Integer getRadioCnt() {
		return radioCnt;
	}
	
	/**
	 * 设置 单选题数
	 * @param radioCnt 单选题数
	 * @return 当前对象
	*/
	public LearnPaper setRadioCnt(Integer radioCnt) {
		this.radioCnt=radioCnt;
		return this;
	}
	
	/**
	 * 获得 多选题数<br>
	 * 多选题数
	 * @return 多选题数
	*/
	public Integer getChoiceCnt() {
		return choiceCnt;
	}
	
	/**
	 * 设置 多选题数
	 * @param choiceCnt 多选题数
	 * @return 当前对象
	*/
	public LearnPaper setChoiceCnt(Integer choiceCnt) {
		this.choiceCnt=choiceCnt;
		return this;
	}
	
	/**
	 * 获得 填空题数<br>
	 * 填空题数
	 * @return 填空题数
	*/
	public Integer getTextareaCnt() {
		return textareaCnt;
	}
	
	/**
	 * 设置 填空题数
	 * @param textareaCnt 填空题数
	 * @return 当前对象
	*/
	public LearnPaper setTextareaCnt(Integer textareaCnt) {
		this.textareaCnt=textareaCnt;
		return this;
	}
	
	/**
	 * 获得 备注<br>
	 * 备注
	 * @return 备注
	*/
	public String getNotes() {
		return notes;
	}
	
	/**
	 * 设置 备注
	 * @param notes 备注
	 * @return 当前对象
	*/
	public LearnPaper setNotes(String notes) {
		this.notes=notes;
		return this;
	}
	
	/**
	 * 获得 创建人ID<br>
	 * 创建人ID
	 * @return 创建人ID
	*/
	public String getCreateBy() {
		return createBy;
	}
	
	/**
	 * 设置 创建人ID
	 * @param createBy 创建人ID
	 * @return 当前对象
	*/
	public LearnPaper setCreateBy(String createBy) {
		this.createBy=createBy;
		return this;
	}
	
	/**
	 * 获得 创建时间<br>
	 * 创建时间
	 * @return 创建时间
	*/
	public Date getCreateTime() {
		return createTime;
	}
	
	/**
	 * 设置 创建时间
	 * @param createTime 创建时间
	 * @return 当前对象
	*/
	public LearnPaper setCreateTime(Date createTime) {
		this.createTime=createTime;
		return this;
	}
	
	/**
	 * 获得 修改人ID<br>
	 * 修改人ID
	 * @return 修改人ID
	*/
	public String getUpdateBy() {
		return updateBy;
	}
	
	/**
	 * 设置 修改人ID
	 * @param updateBy 修改人ID
	 * @return 当前对象
	*/
	public LearnPaper setUpdateBy(String updateBy) {
		this.updateBy=updateBy;
		return this;
	}
	
	/**
	 * 获得 修改时间<br>
	 * 修改时间
	 * @return 修改时间
	*/
	public Date getUpdateTime() {
		return updateTime;
	}
	
	/**
	 * 设置 修改时间
	 * @param updateTime 修改时间
	 * @return 当前对象
	*/
	public LearnPaper setUpdateTime(Date updateTime) {
		this.updateTime=updateTime;
		return this;
	}
	
	/**
	 * 获得 是否已删除<br>
	 * 是否已删除
	 * @return 是否已删除
	*/
	public Integer getDeleted() {
		return deleted;
	}
	
	/**
	 * 获得 是否已删除 的投影属性<br>
	 * 等价于 getDeleted 方法，获得对应的枚举类型
	 * @return 是否已删除
	*/
	@Transient
	public Boolean isDeleted() {
		if(this.deletedBool==null) {
			this.deletedBool=DataParser.parseBoolean(deleted);
		}
		return this.deletedBool ;
	}
	
	/**
	 * 设置 是否已删除
	 * @param deleted 是否已删除
	 * @return 当前对象
	*/
	@JsonProperty("deleted")
	public LearnPaper setDeleted(Integer deleted) {
		this.deleted=deleted;
		this.deletedBool=DataParser.parseBoolean(deleted);
		return this;
	}
	
	/**
	 * 设置 是否已删除的投影属性，等同于设置 是否已删除
	 * @param deletedBool 是否已删除
	 * @return 当前对象
	*/
	@Transient
	public LearnPaper setDeleted(Boolean deletedBool) {
		if(deletedBool==null) {
			this.deleted=null;
		} else {
			this.deleted=deletedBool?1:0;
		}
		this.deletedBool=deletedBool;
		return this;
	}
	
	/**
	 * 获得 删除人ID<br>
	 * 删除人ID
	 * @return 删除人ID
	*/
	public String getDeleteBy() {
		return deleteBy;
	}
	
	/**
	 * 设置 删除人ID
	 * @param deleteBy 删除人ID
	 * @return 当前对象
	*/
	public LearnPaper setDeleteBy(String deleteBy) {
		this.deleteBy=deleteBy;
		return this;
	}
	
	/**
	 * 获得 删除时间<br>
	 * 删除时间
	 * @return 删除时间
	*/
	public Date getDeleteTime() {
		return deleteTime;
	}
	
	/**
	 * 设置 删除时间
	 * @param deleteTime 删除时间
	 * @return 当前对象
	*/
	public LearnPaper setDeleteTime(Date deleteTime) {
		this.deleteTime=deleteTime;
		return this;
	}
	
	/**
	 * 获得 version<br>
	 * version
	 * @return version
	*/
	public Integer getVersion() {
		return version;
	}
	
	/**
	 * 设置 version
	 * @param version version
	 * @return 当前对象
	*/
	public LearnPaper setVersion(Integer version) {
		this.version=version;
		return this;
	}
	
	/**
	 * 获得 租户<br>
	 * 租户
	 * @return 租户
	*/
	public String getTenantId() {
		return tenantId;
	}
	
	/**
	 * 设置 租户
	 * @param tenantId 租户
	 * @return 当前对象
	*/
	public LearnPaper setTenantId(String tenantId) {
		this.tenantId=tenantId;
		return this;
	}
	
	/**
	 * 获得 paperQuestionList<br>
	 * paperQuestionList
	 * @return paperQuestionList
	*/
	public List<PaperQuestion> getPaperQuestionList() {
		return paperQuestionList;
	}
	
	/**
	 * 设置 paperQuestionList
	 * @param paperQuestionList paperQuestionList
	 * @return 当前对象
	*/
	public LearnPaper setPaperQuestionList(List<PaperQuestion> paperQuestionList) {
		this.paperQuestionList=paperQuestionList;
		return this;
	}
	
	/**
	 * 添加 paperQuestionList
	 * @param paperQuestion paperQuestionList
	 * @return 当前对象
	*/
	public LearnPaper addPaperQuestion(PaperQuestion... paperQuestion) {
		if(this.paperQuestionList==null) {
			paperQuestionList=new ArrayList<>();
		}
		this.paperQuestionList.addAll(Arrays.asList(paperQuestion));
		return this;
	}
	
	/**
	 * 获得 typeDict<br>
	 * typeDict
	 * @return typeDict
	*/
	public DictItem getTypeDict() {
		return typeDict;
	}
	
	/**
	 * 设置 typeDict
	 * @param typeDict typeDict
	 * @return 当前对象
	*/
	public LearnPaper setTypeDict(DictItem typeDict) {
		this.typeDict=typeDict;
		return this;
	}
	
	/**
	 * 获得 selectedCode<br>
	 * selectedCode
	 * @return selectedCode
	*/
	public String getSelectedCode() {
		return selectedCode;
	}
	
	/**
	 * 设置 selectedCode
	 * @param selectedCode selectedCode
	 * @return 当前对象
	*/
	public LearnPaper setSelectedCode(String selectedCode) {
		this.selectedCode=selectedCode;
		return this;
	}

	/**
	 * 将自己转换成指定类型的PO
	 * @param poType  PO类型
	 * @return LearnPaper , 转换好的 LearnPaper 对象
	*/
	@Transient
	public <T extends Entity> T toPO(Class<T> poType) {
		return EntityContext.create(poType, this);
	}

	/**
	 * 将自己转换成任意指定类型
	 * @param pojoType  Pojo类型
	 * @return LearnPaper , 转换好的 PoJo 对象
	*/
	@Transient
	public <T> T toPojo(Class<T> pojoType) {
		if(Entity.class.isAssignableFrom(pojoType)) {
			return (T)this.toPO((Class<Entity>)pojoType);
		}
		try {
			T pojo=pojoType.newInstance();
			EntityContext.copyProperties(pojo, this);
			return pojo;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public LearnPaper clone() {
		return duplicate(true);
	}

	/**
	 * 复制当前对象
	 * @param all 是否复制全部属性，当 false 时，仅复制来自数据表的属性
	*/
	@Transient
	public LearnPaper duplicate(boolean all) {
		com.dt.platform.domain.hr.meta.LearnPaperMeta.$$proxy$$ inst = new com.dt.platform.domain.hr.meta.LearnPaperMeta.$$proxy$$();
		inst.setNotes(this.getNotes());
		inst.setJudgeCnt(this.getJudgeCnt());
		inst.setUpdateTime(this.getUpdateTime());
		inst.setType(this.getType());
		inst.setRadioCnt(this.getRadioCnt());
		inst.setVersion(this.getVersion());
		inst.setTotalCnt(this.getTotalCnt());
		inst.setCreateBy(this.getCreateBy());
		inst.setDeleted(this.getDeleted());
		inst.setCreateTime(this.getCreateTime());
		inst.setUpdateBy(this.getUpdateBy());
		inst.setDeleteTime(this.getDeleteTime());
		inst.setTextareaCnt(this.getTextareaCnt());
		inst.setName(this.getName());
		inst.setTenantId(this.getTenantId());
		inst.setDeleteBy(this.getDeleteBy());
		inst.setId(this.getId());
		inst.setChoiceCnt(this.getChoiceCnt());
		if(all) {
			inst.setPaperQuestionList(this.getPaperQuestionList());
			inst.setTypeDict(this.getTypeDict());
			inst.setSelectedCode(this.getSelectedCode());
		}
		inst.clearModifies();
		return inst;
	}

	/**
	 * 克隆当前对象
	*/
	@Transient
	public LearnPaper clone(boolean deep) {
		return EntityContext.clone(LearnPaper.class,this,deep);
	}

	/**
	 * 将 Map 转换成 LearnPaper
	 * @param learnPaperMap 包含实体信息的 Map 对象
	 * @return LearnPaper , 转换好的的 LearnPaper 对象
	*/
	@Transient
	public static LearnPaper createFrom(Map<String,Object> learnPaperMap) {
		if(learnPaperMap==null) return null;
		LearnPaper po = create();
		EntityContext.copyProperties(po,learnPaperMap);
		po.clearModifies();
		return po;
	}

	/**
	 * 将 Pojo 转换成 LearnPaper
	 * @param pojo 包含实体信息的 Pojo 对象
	 * @return LearnPaper , 转换好的的 LearnPaper 对象
	*/
	@Transient
	public static LearnPaper createFrom(Object pojo) {
		if(pojo==null) return null;
		LearnPaper po = create();
		EntityContext.copyProperties(po,pojo);
		po.clearModifies();
		return po;
	}

	/**
	 * 创建一个 LearnPaper，等同于 new
	 * @return LearnPaper 对象
	*/
	@Transient
	public static LearnPaper create() {
		return new com.dt.platform.domain.hr.meta.LearnPaperMeta.$$proxy$$();
	}

	/**
	 * 从 Map 读取
	 * @param map 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(Map<String, Object> map,boolean cast) {
		if(map==null) return false;
		if(cast) {
			this.setNotes(DataParser.parse(String.class, map.get(LearnPaperMeta.NOTES)));
			this.setJudgeCnt(DataParser.parse(Integer.class, map.get(LearnPaperMeta.JUDGE_CNT)));
			this.setUpdateTime(DataParser.parse(Date.class, map.get(LearnPaperMeta.UPDATE_TIME)));
			this.setType(DataParser.parse(String.class, map.get(LearnPaperMeta.TYPE)));
			this.setRadioCnt(DataParser.parse(Integer.class, map.get(LearnPaperMeta.RADIO_CNT)));
			this.setVersion(DataParser.parse(Integer.class, map.get(LearnPaperMeta.VERSION)));
			this.setTotalCnt(DataParser.parse(Integer.class, map.get(LearnPaperMeta.TOTAL_CNT)));
			this.setCreateBy(DataParser.parse(String.class, map.get(LearnPaperMeta.CREATE_BY)));
			this.setDeleted(DataParser.parse(Integer.class, map.get(LearnPaperMeta.DELETED)));
			this.setCreateTime(DataParser.parse(Date.class, map.get(LearnPaperMeta.CREATE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, map.get(LearnPaperMeta.UPDATE_BY)));
			this.setDeleteTime(DataParser.parse(Date.class, map.get(LearnPaperMeta.DELETE_TIME)));
			this.setTextareaCnt(DataParser.parse(Integer.class, map.get(LearnPaperMeta.TEXTAREA_CNT)));
			this.setName(DataParser.parse(String.class, map.get(LearnPaperMeta.NAME)));
			this.setTenantId(DataParser.parse(String.class, map.get(LearnPaperMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, map.get(LearnPaperMeta.DELETE_BY)));
			this.setId(DataParser.parse(String.class, map.get(LearnPaperMeta.ID)));
			this.setChoiceCnt(DataParser.parse(Integer.class, map.get(LearnPaperMeta.CHOICE_CNT)));
			// others
			this.setTypeDict(DataParser.parse(DictItem.class, map.get(LearnPaperMeta.TYPE_DICT)));
			this.setSelectedCode(DataParser.parse(String.class, map.get(LearnPaperMeta.SELECTED_CODE)));
			return true;
		} else {
			try {
				this.setNotes( (String)map.get(LearnPaperMeta.NOTES));
				this.setJudgeCnt( (Integer)map.get(LearnPaperMeta.JUDGE_CNT));
				this.setUpdateTime( (Date)map.get(LearnPaperMeta.UPDATE_TIME));
				this.setType( (String)map.get(LearnPaperMeta.TYPE));
				this.setRadioCnt( (Integer)map.get(LearnPaperMeta.RADIO_CNT));
				this.setVersion( (Integer)map.get(LearnPaperMeta.VERSION));
				this.setTotalCnt( (Integer)map.get(LearnPaperMeta.TOTAL_CNT));
				this.setCreateBy( (String)map.get(LearnPaperMeta.CREATE_BY));
				this.setDeleted( (Integer)map.get(LearnPaperMeta.DELETED));
				this.setCreateTime( (Date)map.get(LearnPaperMeta.CREATE_TIME));
				this.setUpdateBy( (String)map.get(LearnPaperMeta.UPDATE_BY));
				this.setDeleteTime( (Date)map.get(LearnPaperMeta.DELETE_TIME));
				this.setTextareaCnt( (Integer)map.get(LearnPaperMeta.TEXTAREA_CNT));
				this.setName( (String)map.get(LearnPaperMeta.NAME));
				this.setTenantId( (String)map.get(LearnPaperMeta.TENANT_ID));
				this.setDeleteBy( (String)map.get(LearnPaperMeta.DELETE_BY));
				this.setId( (String)map.get(LearnPaperMeta.ID));
				this.setChoiceCnt( (Integer)map.get(LearnPaperMeta.CHOICE_CNT));
				// others
				this.setTypeDict( (DictItem)map.get(LearnPaperMeta.TYPE_DICT));
				this.setSelectedCode( (String)map.get(LearnPaperMeta.SELECTED_CODE));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}

	/**
	 * 从 Map 读取
	 * @param r 记录数据
	 * @param cast 是否用 DataParser 进行类型转换
	 * @return  是否读取成功
	*/
	public boolean read(ExprRcd r,boolean cast) {
		if(r==null) return false;
		if(cast) {
			this.setNotes(DataParser.parse(String.class, r.getValue(LearnPaperMeta.NOTES)));
			this.setJudgeCnt(DataParser.parse(Integer.class, r.getValue(LearnPaperMeta.JUDGE_CNT)));
			this.setUpdateTime(DataParser.parse(Date.class, r.getValue(LearnPaperMeta.UPDATE_TIME)));
			this.setType(DataParser.parse(String.class, r.getValue(LearnPaperMeta.TYPE)));
			this.setRadioCnt(DataParser.parse(Integer.class, r.getValue(LearnPaperMeta.RADIO_CNT)));
			this.setVersion(DataParser.parse(Integer.class, r.getValue(LearnPaperMeta.VERSION)));
			this.setTotalCnt(DataParser.parse(Integer.class, r.getValue(LearnPaperMeta.TOTAL_CNT)));
			this.setCreateBy(DataParser.parse(String.class, r.getValue(LearnPaperMeta.CREATE_BY)));
			this.setDeleted(DataParser.parse(Integer.class, r.getValue(LearnPaperMeta.DELETED)));
			this.setCreateTime(DataParser.parse(Date.class, r.getValue(LearnPaperMeta.CREATE_TIME)));
			this.setUpdateBy(DataParser.parse(String.class, r.getValue(LearnPaperMeta.UPDATE_BY)));
			this.setDeleteTime(DataParser.parse(Date.class, r.getValue(LearnPaperMeta.DELETE_TIME)));
			this.setTextareaCnt(DataParser.parse(Integer.class, r.getValue(LearnPaperMeta.TEXTAREA_CNT)));
			this.setName(DataParser.parse(String.class, r.getValue(LearnPaperMeta.NAME)));
			this.setTenantId(DataParser.parse(String.class, r.getValue(LearnPaperMeta.TENANT_ID)));
			this.setDeleteBy(DataParser.parse(String.class, r.getValue(LearnPaperMeta.DELETE_BY)));
			this.setId(DataParser.parse(String.class, r.getValue(LearnPaperMeta.ID)));
			this.setChoiceCnt(DataParser.parse(Integer.class, r.getValue(LearnPaperMeta.CHOICE_CNT)));
			return true;
		} else {
			try {
				this.setNotes( (String)r.getValue(LearnPaperMeta.NOTES));
				this.setJudgeCnt( (Integer)r.getValue(LearnPaperMeta.JUDGE_CNT));
				this.setUpdateTime( (Date)r.getValue(LearnPaperMeta.UPDATE_TIME));
				this.setType( (String)r.getValue(LearnPaperMeta.TYPE));
				this.setRadioCnt( (Integer)r.getValue(LearnPaperMeta.RADIO_CNT));
				this.setVersion( (Integer)r.getValue(LearnPaperMeta.VERSION));
				this.setTotalCnt( (Integer)r.getValue(LearnPaperMeta.TOTAL_CNT));
				this.setCreateBy( (String)r.getValue(LearnPaperMeta.CREATE_BY));
				this.setDeleted( (Integer)r.getValue(LearnPaperMeta.DELETED));
				this.setCreateTime( (Date)r.getValue(LearnPaperMeta.CREATE_TIME));
				this.setUpdateBy( (String)r.getValue(LearnPaperMeta.UPDATE_BY));
				this.setDeleteTime( (Date)r.getValue(LearnPaperMeta.DELETE_TIME));
				this.setTextareaCnt( (Integer)r.getValue(LearnPaperMeta.TEXTAREA_CNT));
				this.setName( (String)r.getValue(LearnPaperMeta.NAME));
				this.setTenantId( (String)r.getValue(LearnPaperMeta.TENANT_ID));
				this.setDeleteBy( (String)r.getValue(LearnPaperMeta.DELETE_BY));
				this.setId( (String)r.getValue(LearnPaperMeta.ID));
				this.setChoiceCnt( (Integer)r.getValue(LearnPaperMeta.CHOICE_CNT));
				return true;
			} catch (Exception e) {
				return false;
			}
		}
	}
}